package com.ruoyi.leases.service.impl;

import com.ruoyi.leases.domain.Leases;
import com.ruoyi.leases.mapper.LeasesMapper;
import com.ruoyi.leases.service.ILeasesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 租约管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-11
 */
@Service
public class LeasesServiceImpl implements ILeasesService 
{
    @Autowired
    private LeasesMapper leasesMapper;

    /**
     * 查询租约管理
     * 
     * @param leaseId 租约管理主键
     * @return 租约管理
     */
    @Override
    public Leases selectLeasesByLeaseId(Long leaseId)
    {
        return leasesMapper.selectLeasesByLeaseId(leaseId);
    }

    /**
     * 查询租约管理列表
     * 
     * @param leases 租约管理
     * @return 租约管理
     */
    @Override
    public List<Leases> selectLeasesList(Leases leases)
    {
        return leasesMapper.selectLeasesList(leases);
    }

    /**
     * 新增租约管理
     * 
     * @param leases 租约管理
     * @return 结果
     */
    @Override
    public int insertLeases(Leases leases)
    {
        return leasesMapper.insertLeases(leases);
    }

    /**
     * 修改租约管理
     * 
     * @param leases 租约管理
     * @return 结果
     */
    @Override
    public int updateLeases(Leases leases)
    {
        return leasesMapper.updateLeases(leases);
    }

    /**
     * 批量删除租约管理
     * 
     * @param leaseIds 需要删除的租约管理主键
     * @return 结果
     */
    @Override
    public int deleteLeasesByLeaseIds(Long[] leaseIds)
    {
        return leasesMapper.deleteLeasesByLeaseIds(leaseIds);
    }

    /**
     * 删除租约管理信息
     * 
     * @param leaseId 租约管理主键
     * @return 结果
     */
    @Override
    public int deleteLeasesByLeaseId(Long leaseId)
    {
        return leasesMapper.deleteLeasesByLeaseId(leaseId);
    }
}
